package com.rwlai.dianshang.service;

import com.rwlai.dianshang.domain.Order;
import com.rwlai.dianshang.domain.Product;
import com.rwlai.dianshang.domain.User;

/**
 * Created by liutim on 2017/11/28.
 */
public interface ShangchengService {
    
    User addUser(User u);

    Order placeOrder(Order order, User u);

    /**
     *
     * @param p
     * @return
     */
    Product addProduct(Product p);

    /**
     * 
     * @param productid
     * @param count -数量 正数代表加库存，减号代表减库存
     */
    void changeProductStock(String productid,int count);

    Order getOrderById(String id);
}
